// 批量导入所有 .js 文件
const images = import.meta.glob("../assets/images/products/*.png", {
  eager: true,
});

let imageMap: any = {};

// 使用方式
Object.entries(images).forEach(([path, module]) => {
  const match = path.match(/[^/]+$/);
  const key = match?.[0];
  if (key) {
    // @ts-expect-error
    imageMap[key] = module.default || module;
  }
});

const categoryList = [
  // { value: 1, title: "新品热卖" },
  { value: 2, title: "移动摄像机系列" },
  { value: 3, title: "室内摄像机系列" },
  // { value: 4, title: "室外摄像机系列" },
  { value: 5, title: "户外摄像机系列" },
  // { value: 6, title: "配备周边" },
];

const productList = [
  {
    title: "神眸BC6 迷你摄像机",
    cover: imageMap["BC6.png"],
    tag: "4G终身免流｜100g超轻便携设计｜200万像素｜人形识别｜60小时长久守护",
    category: 2,
  },
  {
    title: "神眸BC6+ 迷你摄像机",
    cover: imageMap["BC6+.png"],
    tag: "6轴防抖｜4G终身免流｜100g超轻便携设计｜200万像素｜人形识别｜60小时长久守护",
    category: 2,
  },
  {
    id: "bc6v",
    title: "神眸BC6V 4G生活记录仪",
    cover: imageMap["BC6V 4G.png"],
    tag: "4G终身免流｜实时直联互动｜400万像素｜6轴防抖｜2000mAh大电池｜95g超轻便携设计",
    category: 2,
  },
  {
    title: "神眸BC4 AI智能摄像机",
    cover: imageMap["BC4.png"],
    tag: "4G终身免流｜5000mAh电池｜180小时超长待机｜磁吸便捷安装设计",
    category: 3,
  },
  {
    title: "神眸BC4Pro AI智能摄像机",
    cover: imageMap["BC4Pro.png"],
    tag: "360度水平可视云台｜4G终身免流｜5000mAh电池｜180小时超长待机｜磁吸便捷安装设计",
    category: 3,
  },
  {
    title: "神眸BC4Pro+ AI智能摄像机",
    cover: imageMap["BC4Pro+.png"],
    tag: "360度水平可视云台｜4MP广角+4MP长焦无损变焦｜4G终身免流｜5000mAh电池｜研极芯Gen 1｜9种AI智能检测｜磁吸便捷安装设计",
    category: 3,
  },
  {
    title: "神眸BC22 AI智能摄像机",
    cover: imageMap["BC22.png"],
    tag: "Wi-Fi直连｜5000mAh电池｜180小时超长待机｜200万像素｜磁吸便捷安装设计",
    category: 3,
  },
  {
    title: "神眸BC22E AI智能摄像机",
    cover: imageMap["BC22E.png"],
    tag: "Wi-Fi直连｜5000mAh电池｜180小时超长待机｜400万像素｜磁吸便捷安装设计",
    category: 3,
  },
  {
    title: "神眸BC22+ 4G版 AI智能摄像机",
    cover: imageMap["BC22+.png"],
    tag: "4G终身免流｜400万像素｜5000mAh电池｜180小时超长待机｜磁吸便捷安装设计",
    category: 3,
  },

  {
    title: "神眸C3 4G版AI智能可视摄像机",
    cover: imageMap["C3 4G.png"],
    tag: "4G终身免流｜300万像素｜双向可视通话｜跌倒检测｜经典设计",
    category: 3,
  },

  {
    title: "神眸C3 AI智能可视摄像机",
    cover: imageMap["C3 AI.png"],
    tag: "Wi-Fi直连｜300万像素｜双向可视通话｜坐姿检测｜经典设计",
    category: 3,
  },

  {
    title: "神眸BC3 小飞侠智能摄像机",
    cover: imageMap["BC3.png"],
    tag: "Wi-Fi直连｜5000mAh电池｜180小时超长待机｜400万像素｜磁吸便捷安装设计",
    category: 3,
  },
  {
    title: "神眸C2 AI智能摄像机",
    cover: imageMap["C2 AI.png"],
    tag: "双频Wi-Fi6｜500万像素｜AI摄像师｜经典设计",
    category: 3,
  },
  {
    title: "神眸C2L AI智能摄像机",
    cover: imageMap["C2L AI.png"],
    tag: "Wi-Fi直连｜400万像素｜哭声检测｜宠物追踪｜经典设计",
    category: 3,
  },
  {
    title: "神眸PT2L AI智能摄像机",
    cover: imageMap["PT2L.png"],
    tag: "4G终身免流｜360度水平可视云台｜5000mAh电池｜8W太阳能板｜400万像素｜零电费零网费",
    category: 5,
  },
  {
    title: "神眸PT2C AI智能摄像机",
    cover: imageMap["PT2C.png"],
    tag: "4G终身免流｜360度水平可视云台｜9000mAh电池｜5W太阳能板｜400万像素｜零电费零网费",
    category: 5,
  },
  {
    title: "神眸PT2S AI智能摄像机",
    cover: imageMap["PT2S.png"],
    tag: "4G终身免流｜360度水平可视云台｜18000mAh电池｜8W太阳能板｜400万像素｜零电费零网费",
    category: 5,
  },
];

export { categoryList, productList };
